namespace CSharpPro._1021;

public class Demo
{
    public void TestPrint()
    {
        Father father = new Father();
        father.Print();
        Console.WriteLine(father);
        Child child = new Child();
        child.Print();
        Console.WriteLine(child.id);
        
        Father father2 = new Father();
        father2.Print();
        
        Father father1 = new Father();
        Father father3 = new Child();
        Father father4 = new Son();
        father1.Print();
        father2.Print();
        father3.Print();

        int int32 = Convert.ToInt32("123");
        Student student = new Student(1001, "张三");
        student.UserEmail = "zhangsan@example.com";
        Console.WriteLine(student.Name);

        Student student2 = new Student(1002, "李四"); 
        Console.WriteLine(student2.Id);

        Student student3 = new Student(1003, "王五"); 
        Console.WriteLine(student3.Name);
        Console.WriteLine(student3.ToString());
           
    }

    public int Compare(int a, int b, int c)
    {
        if (a > b && a > c)
        {
            return a;
        }
        else if (b > a && b > c)
        {
            return b;
        }
        else if (c > a && c > b)
        {
            return c;
        }
        else
        {
            return 0;
        }
           
    }

   
}